@props([
    'id' => '',
    'title' => '',
    'size' => 'normal',
    'actions' => '',
    'closable' => true
])

@php
    $sizeClasses = match($size) {
        'sm' => 'modal-box-sm',
        'lg' => 'modal-box-lg',
        'xl' => 'modal-box-xl',
        default => ''
    };
@endphp

<dialog id="{{ $id }}" class="modal modal-bottom sm:modal-middle">
    <div class="modal-box {{ $sizeClasses }}">
        @if($title)
            <h3 class="font-bold text-lg">{{ $title }}</h3>
        @endif
        
        <div class="py-4">
            {{ $slot }}
        </div>
        
        <div class="modal-action">
            @if($actions)
                {!! $actions !!}
            @endif
            
            @if($closable)
                <form method="dialog">
                    <button class="btn">关闭</button>
                </form>
            @endif
        </div>
    </div>
</dialog> 